package com.dfbz.demo01;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo03_Map集合的遍历_key {
    public static void main(String[] args) {

        Map<String, String> map = new HashMap<>();
        map.put("广东", "广州");
        map.put("广西", "南宁");
        map.put("吉林", "长春");
        map.put("黑龙江", "哈尔滨");

        Set<String> keys = map.keySet();
        for (String key : keys) {

            String value = map.get(key);
            System.out.println("key【" + key + "】,value【" + value + "】");
        }

    }
}
